﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CommunityStatus.aspx.cs" Inherits="ValuationClient.项目勘察.CommunityStatus" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link href="../jquery-easyui-1.5.2/themes/default/easyui.css" rel="stylesheet" />
    <link href="../jquery-easyui-1.5.2/themes/icon.css" rel="stylesheet" />
    <script src="../jquery-easyui-1.5.2/jquery.min.js"></script>
    <script src="../jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
    <script src="../jquery-easyui-1.5.2/easyloader.js"></script>
    <script src="../jquery-easyui-1.5.2/jquery.params.js"></script>

</head>
<body>
    <div class="demo-info">
        <div class="demo-tip icon-tip"></div>
    </div>
    <div style="margin: 0;"></div>
    <div class="easyui-panel" fit="true">
        <div style="margin-left: 30px;" id="ff">
            <div>
                <table>
                    <tr>
                        <td>小区四至-东至：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="location_East" data-options="prompt:'请输入小区四至-东至'" style="width: 100%; height: 25px"></td>
                    </tr>
                    <tr>
                        <td>小区四至-南至：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="location_South" data-options="prompt:'请输入小区四至-南至'" style="width: 100%; height: 25px"></td>
                    </tr>
                    <tr>
                        <td>小区四至-西至：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="location_West" data-options="prompt:'请输入小区四至-西至'" style="width: 100%; height: 25px"></td>
                    </tr>
                    <tr>
                        <td>小区四至-北至：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="location_North" data-options="prompt:'请输入小区四至-北至'" style="width: 100%; height: 25px"></td>
                    </tr>
                    <tr>
                        <td>位置环绕：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="location_Position">
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>交通情况：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="location_Traffic" data-options="prompt:'请输入交通情况'" style="width: 100%; height: 25px">
                        </td>
                    </tr>
                    <tr>
                        <td>交通便捷度：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="location_Convenient"></select>
                        </td>
                    </tr>

                    <tr>
                        <td>自然人文环境情况：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="location_Humanity" data-options="prompt:'请输入自然人文环境情况'" style="width: 100%; height: 25px">
                        </td>
                    </tr>
                    <tr>
                        <td>自然人文环境质量：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="location_Quality"></select>
                        </td>
                    </tr>
                    <tr>
                        <td>居住社区成熟情况：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="location_Community" data-options="prompt:'请输入居住社区成熟情况'" style="width: 100%; height: 25px">
                        </td>
                    </tr>
                    <tr>
                        <td>居住社区成熟度：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="location_Mature"></select></td>
                    </tr>
                    <tr>
                        <td>基础设施配套情况：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="location_Facilities" data-options="prompt:'请输入基础设施配套情况'" style="width: 800px; height: 25px">
                        </td>

                    </tr>
                    <tr>
                        <td>基础上设施配套度：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="location_Degree"></select>

                        </td>

                    </tr>
                    <tr>
                        <td>配套设施：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="location_Supporting"></select>
                    </tr>
                    <tr>
                        <td>有关说明：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="location_Explain" data-options="prompt:'说点什么，至少输入10个字符',multiline:true" style="width: 800px; height: 200px"></td>
                    </tr>
                </table>
            </div>
            <div style="text-align: center; padding: 5px">
                <a href="javascript:void(0)" class="easyui-linkbutton" style="width: 100px;text-align:center " onclick="submitForm()">保存</a>
            </div>
        </div>
    </div>
</body>
</html>
 <script>

     //位置环绕
     location_Position();
     function location_Position() {
         $.ajax({
             type: "get",
             url: "http://localhost:55439/api/Dictionary?i="  + 5,
             success: function (obj) {
                 $('#location_Position').combobox({
                     data: obj,
                     valueField: 'Dictionary_Number',
                     textField: 'dictionary_Name'
                 })
             }
         })
     }
     //交通便捷度
     location_Convenient();
     function location_Convenient() {
         $.ajax({
             type: "get",
             url: "http://localhost:55439/api/Dictionary?i=" + 6,
             success: function (obj) {
                 $('#location_Convenient').combobox({
                     data: obj,
                     valueField: 'Dictionary_Number',
                     textField: 'dictionary_Name'
                 })
             }
         })
     }
     //自然人文环境质量
     location_Quality();
     function location_Quality() {
         $.ajax({
             type: "get",
             url: "http://localhost:55439/api/Dictionary?i=" + 7,
             success: function (obj) {
                 $('#location_Quality').combobox({
                     data: obj,
                     valueField: 'Dictionary_Number',
                     textField: 'dictionary_Name'
                 })
             }
         })
     }
     //居住社区成熟度
     location_Mature();
     function location_Mature() {
         $.ajax({
             type: "get",
             url: "http://localhost:55439/api/Dictionary?i="  +8,
             success: function (obj) {
                 $('#location_Mature').combobox({
                     data: obj,
                     valueField: 'Dictionary_Number',
                     textField: 'dictionary_Name'
                 })
             }
         })
     }
     //基础上设施配套度
     location_Degree();
     function location_Degree() {
         $.ajax({
             type: "get",
             url: "http://localhost:55439/api/Dictionary?i=" + 9,
             success: function (obj) {
                 $('#location_Degree').combobox({
                     data: obj,
                     valueField: 'Dictionary_Number',
                     textField: 'dictionary_Name'
                 })
             }
         })
     }
     //配套设施
     location_Supporting();
     function location_Supporting() {
         $.ajax({
             type: "get",
             url: "http://localhost:55439/api/Dictionary?i="+ 10,
             success: function (obj) {
                 $('#location_Supporting').combobox({
                     data: obj,
                     valueField: 'Dictionary_Number',
                     textField: 'dictionary_Name'
                 })
             }
         })
     }
     //保存
     function submitForm() {
         var location_East = $("#location_East").val();
         var location_South = $("#location_South").val();
         var location_West = $("#location_West").val();
         var location_North = $("#location_North").val();
         var location_Position = $('#location_Position').combobox('getValue');
         var location_Convenient = $('#location_Convenient').combobox('getValue');
         var location_Quality = $('#location_Quality').combobox('getValue');
         var location_Mature = $('#location_Mature').combobox('getValue');
         var location_Degree = $('#location_Degree').combobox('getValue');
         var location_Supporting = $('#location_Supporting').combobox('getValue');
         var location_Traffic = $("#location_Traffic").val();
         var location_Humanity = $("#location_Humanity").val();
         var location_Community = $("#location_Community").val();
         var location_Facilities = $("#location_Facilities").val();
         var location_Explain = $("#location_Explain").val();
         var prenum = $.query.get("id");//项目号;

         $.ajax({
             type: "post",
             url: "http://localhost:55439/api/prospecting/Post",
             data: {
                 projectNumber: prenum,
                 location_East: location_East, location_South: location_South, location_West: location_West,
                 location_North: location_North, location_Position: location_Position, location_Convenient: location_Convenient,
                 location_Quality: location_Quality, location_Mature: location_Mature, location_Degree: location_Degree,
                 location_Supporting: location_Supporting, location_Traffic: location_Traffic, location_Humanity: location_Humanity,
                 location_Community: location_Community, location_Facilities: location_Facilities, location_Explain: location_Explain
             },
             success: function (obj) {
                 if (obj) {
                     $.messager.alert("提示信息", "保存成功");
                 }
                 else {
                     $.messager.alert("提示信息", "保存失败");
                 }

             }
         })
     }
    </script>

